import java.util.*;

public class Practice3 {
    //https://ac.nowcoder.com/acm/problem/214850
    //这题开始没做出来, 没看懂题意, 哈希＋双指针即可
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int k = sc.nextInt();
        while(k-- > 0){
            int n = sc.nextInt();
            int[][] hash = new int[n][26];
            for(int i = 0;i < n;i++){
                char[] ss = sc.next().toCharArray();
                for(int j = 0;j < ss.length;j++){
                    int x = ss[j] - 'a';
                    hash[i][x]++;
                }
            }
            if(check(hash)){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
    }

    private static boolean check(int[][] hash) {
        int left = 0;
        int right = hash.length - 1;
        while(left < right){
            boolean flag = false;
            for (int i = 0; i < 26; i++) {
                if(hash[left][i] > 0 && hash[right][i] > 0){
                    flag = true;
                    break;
                }
            }
            if(!flag){
                left++;
                right--;
            }else{
                return false;
            }
        }
        return true;
    }
}
